//
//  TSYNavigationController.swift
//  TSYWeiBoDemo
//
//  Created by apple on 2016/11/23.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

class TSYNavigationController: UINavigationController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        navigationBar.isHidden = true
    }

    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        
        if childViewControllers.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
            
            if let vc = viewController as? TSYBaseViewController {
                
                vc.navItem.leftBarButtonItem = UIBarButtonItem()
            }
            
        }
        
        super.pushViewController(viewController, animated: true)
    }

}
